/////////////////////////////////////////////////////////////////////////////
// Copyright(c) 2012-2015 purang All Rights Reserved
// Name:        critical_section_win.h
// Purpose:     
// Author:      syy
// Modified by: 
// Created:     2014/1/3 14:23
// RCS-ID:      
// Licence:     
/////////////////////////////////////////////////////////////////////////////

#ifndef PR_SYSTEM_WRAPPERS_SOURCE_CRITICAL_SECTION_WIN_H_
#define PR_SYSTEM_WRAPPERS_SOURCE_CRITICAL_SECTION_WIN_H_

#include <windows.h>
#include "critical_section_wrapper.h"
#include "../typedefs.h"

namespace qb
{
	class CriticalSectionWindows : public CriticalSectionWrapper
	{
	public:
		CriticalSectionWindows();

		virtual ~CriticalSectionWindows();

		virtual void Enter();
		virtual void Leave();

	private:
		CRITICAL_SECTION crit;

		friend class ConditionVariableEventWin;
		friend class ConditionVariableNativeWin;
	};

}  // namespace qb

#endif  // PR_SYSTEM_WRAPPERS_SOURCE_CRITICAL_SECTION_WIN_H_
